﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace SurrealTodoAdapter
{
    public class User
    {
        public string name { get; set; }
        public string tab_id { get; set; }
        public DateTime date_created { get; set; }
        public string position { get; set; }
        public string trash { get; set; }

        public List<TaskPage> Pages
        {
            get; set; 
        }
    }

    public static class UserExt
    {
        public static TaskList GetDefaultTaskList(this User user)
        {
            return user.Pages.First().TaskLists.First();
        }

        public static List<TaskList> GetTaskLists(this User user)
        {
            return user.Pages.First().TaskLists;
        }
    }

}